import 'package:fijkplayer/fijkplayer.dart';
import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';

import 'rtmp_state.dart';

Widget buildView(RtmpState state, Dispatch dispatch, ViewService viewService) {
  return Scaffold(
    body: Center(
      child: AspectRatio(
        aspectRatio: 16 / 9,
        child: state.player != null
            ? FijkView(
          player: state.player,
          fit: FijkFit.ar16_9,
          fsFit: FijkFit.ar16_9,
          color: Colors.deepPurpleAccent,
        )
            : SizedBox(
          width: 20,
        ),
      ),
    ),
  );
}
